package Year22_Month03.day23;

public class Solution {
    //不用加减乘除做加法
    public int Add(int num1,int num2) {
        int a = 0;
        int b = 0;
        do {
            a = num1 ^ num2;
            b = (num1 & num2) << 1;
            num1 = a;
            num2 = b;
        }while (num2 != 0);
        return a;
    }
}
